Attenuator

ABSTRACT

An attenuator for attenuating a signal is disclosed. The attenuator comprises a differential input port with a positive input node and a negative input node to receive the signal; and a differential output port with a positive output node and a negative output node to output the attenuated signal. The attenuator further comprises a first switched resistor network connected between the positive input node and the positive output node; and a second switched resistor network connected between the negative input node and the negative output node. Further a pair of compensation paths is connected to the first and second switched resistor networks for cancellation their parasitic leakages, where a first compensation path is connected between the positive input node and the negative output node, and a second compensation path is connected between the negative input node and the positive output node. The attenuator further comprises a control circuit to generate control signals for controlling the first and second switched resistor networks.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. application Ser. No.15/532,694 filed Jun. 2, 2017 (371(c) date), which is a 35 U.S.C. § 371national stage of international application PCT/EP2014/076394 filed Dec.3, 2014. All of these earlier applications are hereby incorporatedherein by reference in their entireties.

TECHNICAL FIELD

Embodiments herein relate to an attenuator for attenuating a signal. Inparticular, they relate to a radio frequency wideband step attenuatorfor attenuating a radio frequency signal in an electronic device.

BACKGROUND

Attenuators are circuits used to control amplitude of a signal eithercontinuously or in steps. When the signal is controlled in steps by anattenuator, the attenuator is referred as a step attenuator. Theattenuators or step attenuators are widely employed in variouselectronic devices, e.g. radio frequency transceivers or radio frequencyfrontends in wireless communication devices including, for example userequipment or mobile devices and base stations, multi-antenna systems inradio base stations for both communication and localization, as well asin other general electronic circuits and equipment, such as automaticgain control circuits and measurement equipment etc. For radio frequencyfrontends, an on-chip step attenuator designed in ComplementaryMetal-Oxide-Semiconductor (CMOS) technology has advantages of smallsize, low cost, flexible and high integration level etc. There are somerequirements for designing on-chip step attenuators, such as goodlinearity, low insertion loss, wide bandwidth and accuracy inattenuation steps etc.

In Cheng, W. et al, A Wideband IM3 Cancellation Technique for CMOSAttenuators, IEEE International Solid-State Circuits Conference, 2012,and in Cheng, W. et al, A Wideband IM3 Cancellation Technique for CMOSTT- and T-Attenuators, IEEE Journal of Solid-State Circuits, 2013, Vol.48, NO. 2, on-chip Pi-type and T-type step attenuators are disclosedwhich provide attenuation steps of 6, 12, 18 and 24 dB. However, thedisclosed Pi-type and T-type step attenuators have large insertion losswhen working at lower attenuation mode, i.e. when attenuation level islower, such as attenuation steps of 6 or 12 dB, especially when noattenuation is needed. High insertion loss will reduce gain and requiredsignal to noise ratio (SNR) for input signals. Further, the disclosedPi-type and T-type step attenuators also suffer from switch leakageswhich damage attenuation levels for the input signals at highfrequencies during deep attenuation mode.

In Xiao, J. et al, A High Dynamic Range CMOS Variable Gain Amplifier forMobile DTV Tuner, IEEE Journal of Solid-State Circuits, 2007, Vol. 42,No. 2, a variable gain amplifier suitable for mobile digital television(DTV) tuners is presented. Variable gain is achieved by using acapacitive attenuator and current-steering transconductance stages.Although the presented variable gain amplifier provides gain andattenuation, its linearity is poor due to active devices, i.e. thetransconductance stages. A poor linearity will result in poor frequencyselectivity for a radio frequency front-end, and thus degrade requiredSNR due to interferences from other unwanted frequency signals.

SUMMARY

Therefor it is an object of embodiments herein to provide an attenuatorwith improved performance.

According to one aspect of embodiments herein, the object is achieved byan attenuator for attenuating a signal. The attenuator comprises adifferential input port with a positive input node and a negative inputnode to receive the signal, and a differential output port with apositive output node and a negative output node to output the attenuatedsignal. The attenuator further comprises a first switched resistornetwork connected between the positive input node and the positiveoutput node; and a second switched resistor network connected betweenthe negative input node and the negative output node. The attenuatorfurther comprises a pair of compensation paths for cancellation ofparasitic leakages in the first and second switched resistor networks.The pair of compensation paths is connected such that a firstcompensation path is connected between the positive input node and thenegative output node, and a second compensation path is connectedbetween the negative input node and the positive output node. Theattenuator further comprises a control circuit to generate controlsignals for controlling the first and second switched resistor networks.

Since the attenuator according to embodiments herein uses the pair ofcompensation paths, parasitic leakages in the first and second switchedresistor networks are cancelled. The cancellation is achieved bycross-coupling the pair of compensation paths, i.e. the firstcompensation path is connected between the positive input node and thenegative output node, and the second compensation path is connectedbetween the negative input node and the positive output node. In thisway, any leakage signals at the positive input node are coupled to thenegative output node, so as to cancel any leakage signals at thenegative output node. In the same way, any leakage signals at thenegative input node are coupled to the positive output node, so as tocancel any leakage signals at the positive output node. This results ina good attenuation performance, especially at high frequencies and indeep attenuation steps. Further the switched resistor networks arepassive and therefor have a high linearity.

Thus, embodiments herein provide attenuators with improved performanceon e.g. linearity and attenuation levels at high frequencies and in deepattenuation steps, etc.

BRIEF DESCRIPTION OF THE DRAWINGS

Examples of embodiments herein are described in more detail withreference to attached drawings in which:

FIG. 1 is a general block view of an attenuator according to embodimentsherein.

FIG. 2 is a schematic block view illustrating an attenuator with Pi-typeswitched resistor networks according to embodiments herein.

FIG. 3 is a schematic block view illustrating an attenuator with T-typeswitched resistor networks according to embodiments herein.

FIG. 4 is a schematic diagram illustrating a switchably variable seriesresistor according to embodiments herein.

FIG. 5 is a schematic diagram illustrating a switchably variableparallel resistorccording to embodiments herein.

FIG. 6 is a schematic diagram illustrating a compensation path accordingto embodiments herein.

FIG. 7 is a simplified schematic diagram illustrating an equivalentcircuit for the Pi-type switched resistor network in FIG. 2.

FIG. 8 is a diagram showing frequency response for an attenuatoraccording to one embodiment herein.

FIG. 9 is a diagram showing frequency response for an attenuatoraccording to another embodiment herein.

FIG. 10 is a drawing showing an example layout of compensation inductorsaccording to embodiments herein.

FIG. 11 is a block diagram illustrating an electronic device in whichembodiments herein may be implemented.

DETAILED DESCRIPTION

A general view of an attenuator 100 for attenuating a signal accordingto embodiments herein is shown in FIG. 1. The attenuator 100 comprises adifferential input port Inp/Inn with a positive input node Inp and anegative input node Inn to receive the signal, and a differential outputport Outp/Outn with a positive output node Outp and a negative outputnode Outn to output the attenuated signal.

The attenuator 100 further comprises a first switched resistor network102 connected between the positive input node Inp and the positiveoutput node Outp, and a second switched resistor network 104 connectedbetween the negative input node Inn and the negative output node Outn.The first and second switched resistor networks 102/104 are configuredto create desired attenuation.

The attenuator 100 further comprises a pair of compensation paths forcancellation of parasitic leakages in the first and second switchedresistor networks 102/104. As shown in FIG. 1, a first compensation path106 referred to as Neutralization Compensation NC 106 in FIG. 1, isconnected between the positive input node Inp and the negative outputnode Outn, and a second compensation path 108 referred to as NC 108 inFIG. 1, is connected between the negative input node Inn and thepositive output node Outp.

Further, a control circuit 110 is also comprised in the attenuator 100to generate control signals for controlling the first and secondswitched resistor networks 102/104.

According to some embodiments, the control circuit 110 in the attenuator100 may be further configured to generate control signals forcontrolling the pair of compensation paths 106/108.

The control signals CtrlS, CtrlP and CtrlNC are generated by the controlcircuit 110 through digital data interface. The first and secondswitched resistor networks 102/202 are controlled by the control signalsCtrlP and CtrlS so that the resistance values of the first and secondswitched resistor networks 102/202 are tunable. The control signalCtrlNC is to control the compensation path 106/108.

According to some embodiments, the attenuator 100 may further comprise afirst pair of inductors L1 a/L1 b connected at the differential inputport Inp/Inn and a second pair of inductors L2 a/L2 b connected at thedifferential output port Outp/Outn. In these embodiments, the first andsecond switched resistor networks 102/104 are coupled to thedifferential input/output port via the first and second pair ofinductors, respectively. The first and second pair of inductors L1 a/L1b, L2 a/L2 b are used to compensate the bandwidth of the attenuator 100.According to some embodiments, the first and second pair of inductorsare mutually coupled inductors, with coupling coefficients M1 and M2respectively.

According to one embodiment, the attenuator 100 may be implemented bycircuits shown in FIG. 2, where the first and second switched resistornetworks 102/104 may be implemented by Pi-type switched resistornetworks 202/204.

As shown in FIG. 2, the Pi-type switched resistor networks 202/204 eachcomprises two switchably variable parallel resistors Rp and oneswitchably variable series resistor Rs.

According to one embodiment, the attenuator 100 may be implemented bycircuits shown in FIG. 3, where the first and second switched resistornetworks 102/104 may be implemented by T-type switched resistor networks302/304.

As shown in FIG. 3, the T-type switched resistor networks 302/304 eachcomprises one switchably variable parallel resistor Rp and twoswitchably variable series resistors Rs.

According to some embodiments, the switchably variable series resistorRs may be implemented by circuits shown in FIG. 4, where FIG. 4(a) showsa symbol of the switchably variable series resistor Rs, FIG. 4(b) showsan example structure of the switchably variable series resistor Rs andFIG. 4(c) shows each branch of the switchably variable series resistorRs in more detail.

As shown in FIG. 4(b), the switchably variable series resistor Rscomprises one or more switched resistor branches 400, 401, . . . 40 n,each of the one or more switched resistor branches 400, 401, . . . 40 ncomprises a resistor Rs₀, Rs₁, . . . Rs_(n) in series with a switch. Theswitchably variable series resistor Rs further comprises a by-pass path40 b.

As shown in FIG. 4(c), for one or more switches, a bootstrap pathcomprising a capacitor in series with a resistor is connected between agate and a drain or source of the switch depending on size of the one ormore switches. Using bootstrap path can effectively improve thelinearity of the switch. However, for smaller size of the switches, thebootstrap path may not be needed, for example, in branch 400, there isno bootstrap path connected between a gate and a drain or source of theswitch Ts₀.

As shown in FIG. 4(c), the by-pass path 40 b comprises a switch Tb, anda bootstrap path comprising a capacitor Cb in series with a resistor Rbis connected between a gate and a drain or source of the switch Tb.

When the switchably variable series resistor Rs comprises multipleswitched resistor branches 400, 401, . . . 40 n, the control signalCtrlS generated by the control circuit 110 comprises multiple controlsignals Ctrls0, Ctrls1, . . . , Ctrlsn to control the switch in eachbranch, where n is positive integer. The control signal CtrlS furthercomprises Ctrlspass to control the by-pass path 40 b.

According to some embodiments, the switchably variable parallel resistorRp may be implemented by circuits shown in FIG. 5, where FIG. 5(a) showsa symbol of the switchably variable parallel resistor Rp, FIG. 5(b)shows an example structure of the switchably variable parallel resistorRp and FIG. 5(c) shows each branch of the switchably variable parallelresistor Rp in more detail.

As shown in FIG. 5(b), the switchably variable parallel resistor Rpcomprises one or more switched resistor branches 500, 501, . . . 50 m,and the switchably variable parallel resistor Rp further comprises aresistor (RPb) connected in series with the switched resistor branches500, 501, . . . 50 m. Each of the one or more switched resistor branches500, 501, . . . 50 m comprises a resistor Rp₀, Rp₁, . . . Rp_(n), inseries with a switch. As shown in FIG. 5(c), for one or more switches, abootstrap path comprising a capacitor in series with a resistor isconnected between a gate and a drain or source of the switch dependingon size of the one or more switches. For example, for smaller sizeswitch Tp₀ in branch 500, there is no bootstrap path connected between agate and a drain or source of the switch Tp₀.

When the switchably variable parallel resistor Rp comprises multipleswitched resistor branches 500, 501, . . . 50 m, the control signalCtrlP generated by the control circuit 110 comprises multiple controlsignals Ctrlp0, Ctrlp1, . . . , Ctrlpm to control the switch in eachbranch, where m is positive integer.

According to some embodiments, the compensation path 106/108 may beimplemented by circuits shown in FIG. 6, where FIG. 6(a) shows a symbolof the compensation path 106/108, FIG. 6(b) shows an example structureof the compensation path 106/108, and FIG. 6(c) shows another examplestructure of the compensation path 106/108. As shown in FIGS. 6(b) and(c), each compensation path 106/108 comprises one or more switchedcapacitor branches, and each switched capacitor branch comprises acapacitor, Cnc, Cnc₀, Cnc₁, . . . Cnc_(k) connected in series with aresistor, Rnc, Rnc₀, Rnc₁, . . . Rnc_(k). In by-pass mode, thecompensation paths for cancelling the parasitic leakages can be switchedoff as to reduce the insertion loss.

According to some embodiments, each switched capacitor branch in thecompensation path 106/108 further comprises a switch connected in serieswith the capacitor Cnc, Cnc₀, Cnc₁, . . . Cnc_(k) and the resistor Rnc,Rnc₀, Rnc₁, . . . , Rnc_(k).

When the compensation path 106/108 comprises multiple switched capacitorbranches, the control signal CtrlNC comprises multiple control signalsCtrlnck, . . . , Ctrlnc1, Ctrlnc0 to control the switch in each branch,where k is an integer larger or equal to 0.

Implementation details, performance and advantages of the attenuator 100according to embodiments herein are described below. As described above,the switched resistor network 102/104 are used to set the desiredattenuation. In order to show the relation between the desiredattenuation and the resistor value, example design equations are derivedfor the Pi-type switched resistor network 202/204. A simplifiedequivalent circuit of the Pi-type switched resistor network 202/204without the compensation path is shown in FIG. 7, where FIG. 7(a) showsthe Pi-type switched resistor network 202/204 connected in differential,and FIG. 7(b) shows its single ended part.

For simplicity, the Pi-type switched resistor network 202/204 connectedin single-ended in FIG. 7(b) is analysed, where the input and outputport impedances R_(L)=50 are added to it. In an ideal condition formatching requirement, the switched resistor network 202/204 should matchthe input and output port impedance R_(L)=50 ohm, that isR _(L) =Rp∥(R _(L) ∥Rp+Rs)  Eq. (1)

While in matched condition, the voltage gain vg is given by

$\begin{matrix}{{v\; g} = {\frac{R\; p\text{❘❘}R_{L}}{{Rs} + {{Rp}\text{❘❘}R_{L}}} = \frac{{Rp} \cdot R_{L}}{{{Rs} \cdot {Rp}} + {{Rs} \cdot R_{L}} + {{Rp} \cdot R_{L}}}}} & {{Eq}.\mspace{14mu}(2)}\end{matrix}$

From matching requirement, it is givenRs·Rp ²−2·R _(L) ² ·Rp−R _(L) ² ·Rs=0  Eq. (3)

So Rs may be expressed as

$\begin{matrix}{{Rs} = \frac{2\;{R_{L}^{2} \cdot {Rp}}}{{Rp}^{2} - R_{L}^{2}}} & {{Eq}.\mspace{14mu}(4)}\end{matrix}$

Replace Rs in the attenuation or gain expression (2) with Rs expressionin (4), which gives

$\begin{matrix}{{vg} = {\frac{{Rp} - R_{L}}{{Rp} + R_{L}} = \frac{1 - \alpha}{1 + \alpha}}} & {{Eq}.\mspace{14mu}(5)}\end{matrix}$Where

${\alpha = {\frac{R_{L}}{Rp} < 1}},$for an ideal pure resistor case.

Rp may be written as a function of desired attenuation

$\begin{matrix}{{Rp} = \frac{R_{L} \cdot \left( {1 + {vg}} \right)}{1 - {vg}}} & {{Eq}.\mspace{14mu}(6)}\end{matrix}$Where

${{vg} = 10^{- \frac{VG}{20}}},$and VG is the required or desired attenuation in unit of dB.

It should be noted that above equations are example design equations forPi-type switched resistor network, the skilled person will appreciatethat for T-type switched resistor network, design equations will bedifferent.

Turning back to FIG. 4, where the structure of the switchably variableseries resistor Rs according to one embodiment herein is shown. Asdescribed above, the switchably variable series resistor Rs comprises aby-pass path 40 b, as shown in dashed-line box at the bottom of FIGS.4(b) and (c). When there is no need to attenuate the input signal, theattenuator 100 is set to a by-pass mode and all switched resistorbranches 400, 401, . . . , 40 n are by passed by turning on the switchTb in the by-pass path 40 b. The control signal CtrlSpass is set tologic high during the by-pass mode. As shown in FIG. 4(c), in theby-pass path 40 b, a bootstrap path comprising a capacitor Cb in serieswith a resistor Rb is connected between the gate and drain or source ofthe switch Tb. The purpose of the capacitor Cb is to bootstrap the gatevoltage of the switch Tb by using the input signal at its drain orsource, and to keep the voltage between the gate and drain or sourceclose to a constant DC voltage provided by the control signal CtrlSpass.It means that the conducting resistor Ron of the MOS switch transistorTb is close to constant, thus improving the linearity of the switch Tb.Resistor Rb inserted in the bootstrap path is to avoid increasingcapacitive load in the signal path and also reduce the leakage caused bythe parasitic capacitance of the switch transistor Tb. Resistor Rg is aresistor in series between the control node and the gate of the switchtransistor Tb, and the time constant of RgCb should be much larger thanthe period of the lowest operating frequency. In this way, lowerinsertion loss for the input signals at higher frequencies is achieved.In other attenuation modes, the control signal CtrlSpass is set to logiclow, the switch Tb is turned off, and the by-pass path is disconnected.

The switched resistor branches 400, 401, 40 n are used for differentattenuation settings including the by-pass mode. In the by-pass mode,all control signals Ctrls0, Ctrls1, . . . , Ctrlsn are set to logichigh, so all switches in the switched resistor branches 400, 401, . . ., 40 n are conducting, this reduces the insertion loss further.

While in other attenuation settings, only some of the switched resistorbranches 400, 401, . . . , 40 n conduct, and provide a resistance valueRs according to the expression given by Eq. (4). Due to silicon processvariations, resistance value for an on-chip resistor may vary in a rangeof ±25%. Therefor in practice, more control bits may be added fortrimming the resistance.

The resistors in the switched resistor branches 400, 401, . . . , 40 nmay be designed, e.g. in a binary weighted size, i.e. Rs₀=R, Rs₁=R/2, .. . Rs_(n)=R/2^(n). For the switched resistor branch 40 n, it may beviewed as 2^(n) branches of unit resistor cell R in parallel. So Rs_(n)is the smallest one in resistance, and switch Ts_(n) is the largest onein size. Enlarging the size of Ts_(n) may reduce the impact of theconducting resistance Ron of the switch Ts_(n), so as to improve thelinearity, but at a cost of introducing larger parasitic capacitances inthe signal path. Therefore, bootstrap path used here to improve thelinearity is more effective for the larger size switches, as shown inFIG. 4(c). However, for smaller size switches, the bootstrap path maynot be needed. As seen from FIG. 4(c), for the switched resistor branch400, there is no bootstrap path for switch Ts₀.

For the switchably variable parallel resistor Rp, as shown in FIG. 5,binary weighted resistors may also be used in the switched resistorbranches 500, 501, . . . 50 m. In the by-pass mode, all switchedresistor branches are disconnected, so the insertion loss is minimized.

In other attenuation modes, the value of Rp may be chosen according Eq.(6). Bootstrap paths are also optionally used depending on size of theswitch, e.g. a bootstrap path is used for largest switch Tp_(m) in theswitched resistor branch 50 m, and ignored for the smallest switch Tp₀in the switched resistor branch 500, as shown in FIG. 5(c).

In practice, due to parasitic capacitances between the three nodes, i.e.gate, drain and source of the switch Tb, parasitic leakages exist, andthese leakages damage attenuation settings in deep attenuation steps.FIG. 8 shows attenuation level versus frequency for the by-pass mode anddifferent attenuation steps, where the desired attenuation levels areplotted in solid lines, while the real attenuation levels due to theparasitic capacitances are plotted in dotted lines. It may be seen thatthe parasitic leakages due to the parasitic capacitances ruin thedesired attenuation levels, especially at higher frequencies.

As shown in FIGS. 1-3, the attenuator 100 is in a differentialstructure, this makes it possible to add a pair of compensation path NC106/108 to neutralize or cancel the leakages. The cancellation isachieved by cross-coupling the pair of compensation paths 106/108, i.e.the first compensation path 106 is connected between the positive inputnode Inp and the negative output node Outn, and the second compensationpath 108 is connected between the negative input node Inn and thepositive output node Outp. In this way, any leakage signals at thepositive input node are coupled to the negative output node, therebycancel any leakage signals at the negative output node. In the same way,any leakage signals at the negative input node are coupled to thepositive output node, thereby cancel any leakage signals at the positiveoutput node. This results in a good attenuation performance, especiallyat high frequencies and in deep attenuation steps, as shown in the solidlines in FIG. 8, where the slopes of attenuation levels for all stepsare the same after the compensation.

As described above, the compensation path 106/108 comprises one or moreswitched capacitor branches. When only one switched capacitor branch isused, as shown in FIG. 6(b), to reduce the insertion loss, the switchtransistor is turned off in the by-pass mode, so the compensation pathis disconnected from the switched resistor networks. However, it shouldbe noted that switch transistors in the compensation paths are optional,i.e. the compensation paths may only comprise capacitors and resistors,and may always connected to the switched resistor networks in theby-pass mode and at other attenuation settings.

In FIG. 6(c), several switched capacitor branches are used, so it willgive more freedom to tune compensation for different attenuationsettings or levels. As it is a programmable approach, it may also dealwith process variations and design errors due to inaccurate extractionof the values for the capacitors and resistors in design tools.

From FIG. 8, it may be seen that the attenuation levels have slopesalong the frequency axis. This means that insertion loss at higherfrequencies is higher than that of at lower frequencies, this leads to anarrower bandwidth for the attenuator. To improve the bandwidth, a pairof inductors with mutual coupling may be employed at both the input portand output port. As shown in FIGS. 1-3, the first pair of inductors L1a/L1 b is connected at the differential input port Inp/Inn to resonatewith the input parasitic capacitance at desired frequencies, and thesecond pair of inductors L2 a/L2 b is connected at the differentialoutput port Outp/Outn to resonate with the output parasitic capacitanceat desired frequencies. In this way, the slops of the attenuation levelsare reduced, and the bandwidth of the attenuator 100 is extended. Thisis illustrated in FIG. 9, where the solid curves are frequencyresponses, i.e. attenuation levels versus frequency, with inductorcompensation, and the dotted lines are uncompensated frequencyresponses.

An example layout of the two pairs of mutual coupling inductors is shownin FIG. 10, where the layout of L1 a/L1 b and L2 a/L2 b is designed inan interleaved way, as to save silicon area and increase the Q factor byutilising mutual inductance between the two parts. Of course other typesof separated inductors may also be used, but at a cost of large siliconarea and a bit more insertion loss.

To summarise the discussions above, advantages of various embodiments ofthe attenuator 100 include:

-   -   Accurate attenuation levels or steps: The switched resistor        networks in Pi or T structure make resistances tunable and may        also cope with process variations, so accurate attenuation        levels and steps are provided.    -   Larger range of attenuation: Compensation paths are used to        cancel the parasitic leakages so that attenuation levels or        steps at deep attenuation are more accurate, therefore the        attenuator 100 achieves a larger range of attenuation,    -   Higher linearity and low insertion loss: Bootstrap paths are        used in some embodiments for larger size switch transistors and        for the by-pass path so that linearity is improved and insertion        loss is reduced.    -   Wide bandwidth: Compensation inductors are used in some        embodiments at both input port and output port to resonate with        the input and output parasitic capacitances respectively, so the        bandwidth of the attenuator 100 is extended.

The attenuator 100 according to the embodiments herein may be employedin various electronic devices. FIG. 11 shows a block diagram for anelectronic device 1100, which may be, e.g. a radio frequencytransceiver, a radio frequency frontend, a wireless communicationdevice, such as a user equipment or a mobile device and/or a basestation, a multi-antenna systems in a radio base station, or any generalelectronic circuit or equipment, such as an automatic gain controlcircuit, a measurement equipment etc. The electronic device 1100 maycomprise other units, where a processing unit 1110 is shown, which mayinteractive with the control circuit 110 in the attenuator 100 fordifferent attenuation settings or operating modes.

Those skilled in the art will understand that although switchtransistors in the switched resistor array Rs, Rp, the by-pass path 40 band the compensation path 104/106 of the attenuator 100 as shown inFIGS. 4-6 are Field-Effect Transistors (FET), any other types oftransistors, e.g. Metal-Oxide-Semiconductor FET (MOSFET), Junction FET(JFET), Bipolar Junction Transistors (BJT) etc., may be comprised in theattenuator 100. When using the word “comprise” or “comprising” it shallbe interpreted as non-limiting, i.e. meaning “consist at least of”.

The embodiments herein are not limited to the above described preferredembodiments. Various alternatives, modifications and equivalents may beused. Therefore, the above embodiments should not be taken as limitingthe scope of the invention, which is defined by the appending claims.

The invention claimed is:
 1. An attenuator for attenuating a signalcomprising: a differential input port with a positive input node and anegative input node to receive the signal; a differential output portwith a positive output node and a negative output node to output theattenuated signal; a first switched resistor network connected betweenthe positive input node and the positive output node; a second switchedresistor network connected between the negative input node and thenegative output node; a first path connected between the positive inputnode and the negative output node, the first path comprising one or moreswitched capacitor branches; a second path connected between thenegative input node and the positive output node; and a control circuitto generate control signals for controlling the first and secondswitched resistor networks.
 2. The attenuator according to claim 1,wherein the attenuator further comprises a first pair of inductorsconnected at the differential input port and a second pair of inductorsconnected at the differential output port.
 3. The attenuator accordingto claim 2, wherein the first and second pair of inductors are mutuallycoupled inductors.
 4. The attenuator according to claim 1, wherein thecontrol circuit is further configured to generate control signals forcontrolling the pair of compensation paths.
 5. The attenuator accordingto claim 1, wherein each of the first and second switched resistornetworks is a Pi type resistor network comprising two switchablyvariable parallel resistors and one switchably variable series resistor.6. The attenuator according to claim 5, wherein the switchably variableseries resistor comprises one or more switched resistor branches and aby-pass path.
 7. The attenuator according to claim 6, wherein theby-pass path comprises a switch, and wherein a bootstrap path comprisinga capacitor in series with a resistor is connected between a gate and adrain or source of the switch.
 8. The attenuator according to claim 6,wherein each of the one or more switched resistor branches comprises aresistor in series with a switch, and wherein for one or more switches,a bootstrap path comprising a capacitor in series with a resistor isconnected between a gate and a drain or source of the switches dependingon size of the one or more switches.
 9. The attenuator according toclaim 5, wherein the switchably variable parallel resistor comprises oneor more switched resistor branches connected in series with a resistor.10. The attenuator according to claim 1, wherein each of the first andsecond switched resistor networks is a T type resistor networkcomprising one switchably variable parallel resistor and two switchablyvariable series resistors.
 11. An electronic device comprising anattenuator according to claim
 1. 12. The electronic device according toclaim 11, wherein the electronic device is a transceiver.
 13. Theelectronic device according to claim 11, wherein the electronic deviceis a radio base station.
 14. The attenuator according to claim 1,wherein one or more of the switched capacitor branches of the first pathcomprises a capacitor connected in series with a resistor.
 15. Theattenuator according to claim 14, wherein one or more of the switchedcapacitor branches of the first path further comprises a switchconnected in series with the capacitor and the resistor.
 16. Theattenuator according to claim 1, wherein the second path comprises oneor more switched capacitor branches.
 17. The attenuator according toclaim 16, wherein one or more of the switched capacitor branches of thesecond path comprises a capacitor connected in series with a resistor.18. The attenuator according to claim 17, wherein one or more of theswitched capacitor branches of the second path further comprises aswitch connected in series with the capacitor and the resistor.